#define MaxSpecVeh 9
enum Cenum{ccmd[6],cowner[24],cmodel,ccol1,ccol2,Float:xpos}
new
	C[MaxSpecVeh],Cdata[MaxSpecVeh][Cenum]=
	{
		{"/buf",	"[HLF]Southclaw",	402,	6,		0,		2279.204887},
		{"/tur",	"[HLF]Myst",        451,	149,	149,	2282.343261},
		{"/kitt",	"[HLF]Onfire559",	411,	0,		0,		2285.930175},
		{"/frw",	"[HLF]Defiance",    463,	3,		3,		2289.169433},
		{"/bll",	"[HLF]Gemz",		541,	6,		149,	2292.469482},
		{"/nrg",	"[HLF]Pandaemonium",522,	0,		0,		2295.658544},
		{"/sul",	"[HLF]Southclaw",   560,	1,		1,		2298.976562},
		{"/ice",    "[HLF]Pennywise",   423,	6,		0,		2302.456298},
		{"/bul",	"[HLF]DuskReaper",	541,	0,		3,		2306.754893}
	};

#define buf 0
#define tur 1
#define inf 2
#define frw 3
#define bll 4
#define nrg 5
#define sul 6
#define ice 7
#define bul 8

// Private Car Custom Scripts
new
	C_Flyer[2];

script_PrivCars_OnEnterVeh(playerid, vehicleid, ispassenger)
{
	new Float:pos[3];
	for(new c;c<MaxSpecVeh;c++)
	{
		if(vehicleid==C[c])
		{
			if(!strcmp(GetName(playerid), Cdata[c][cowner]))msgF(playerid, BLUE, "Welcome to your Car, %s. Summon Command: %s", Cdata[c][cowner], Cdata[c][ccmd]);
			else if(ispassenger)msgF(playerid, BLUE, "You are now riding in %s's private car", Cdata[c][cowner]);
			else
			{
			    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
				SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
				msgF(playerid, RED, "This car belongs to %s", Cdata[c][cowner]);
			}
		}
	}
	return 1;
}
script_PrivCars_Command(playerid, cmd[])
{
	new playerveh=GetPlayerVehicleID(playerid);
	for(new c;c<MaxSpecVeh;c++)
	{
		cmd(Cdata[c][ccmd])
		{
		    if(!strcmp(GetName(playerid), Cdata[c][cowner]))
		    {
				new Float:pl[4], Float:sp[3];
				if(!IsPlayerInAnyVehicle(playerid))
				{
					GetPlayerPos(playerid, pl[0], pl[1], pl[2]);
					GetPlayerFacingAngle(playerid, pl[3]);
				}
				else
				{
					GetVehiclePos(playerveh, pl[0], pl[1], pl[2]);
					GetVehicleZAngle(playerveh, pl[3]);
					GetVehicleVelocity(playerveh, sp[0], sp[1], sp[2]);
					DestroyVehicle(playerveh);
				}
				if(GetVehicleModel(C[c])==Cdata[c][cmodel])DestroyVehicle(C[c]);
				C[c]=CreateVehicle(Cdata[c][cmodel], pl[0], pl[1], pl[2], pl[3], Cdata[c][ccol1], Cdata[c][ccol2], 60);
				PutPlayerInVehicle(playerid, C[c], 0);
				SetVehicleVelocity(C[c], sp[0], sp[1], sp[2]);
				v_Engine(C[c], 1);
				msgF(playerid, BLUE, "Welcome to your Car, %s. Summon Command: %s", Cdata[c][cowner], Cdata[c][ccmd]);
				return 1;
			}
			else return 0;
		}
	}
	return 0;
}
